package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.Adv;
import org.darkforest.model.AdvBean;

import java.util.List;

@DBMapper
public interface AdvMapper {
    int deleteByPrimaryKey(Integer advId);

    int insert(Adv record);

    int insertSelective(Adv record);

    Adv selectByPrimaryKey(Integer advId);

    int updateByPrimaryKeySelective(Adv record);

    int updateByPrimaryKey(Adv record);

    List selectByCondition(AdvBean advBean);

    /**
     * 查广告的排序的最大值
     * @return
     */
    int selectNextSort();

    /**
     * 按广告位删除
     * @return
     */
    int deleteByPosition(Integer apId);
}